package com.leetcode.algorithm.y22.m06;

/**
 * 1672. 最富有客户的资产总量
 * 
 * https://leetcode.cn/problems/richest-customer-wealth/
 * 
 * @author jie.deng
 *
 */
class Question1672Solution01 {
	
	public int maximumWealth(int[][] accounts) {
		int m = accounts.length;
		int n = accounts[0].length;
		int max = 0;
		for (int i = 0; i < m; i++) {
			int sum = 0;
			for (int j = 0; j < n; j++) {
				sum += accounts[i][j];
			}
			if (sum > max) {
				max = sum;
			}
		}
		return max;
	}
    
}